<!DOCTYPE html>
<html>
<head>
	<meta charset='utf-8' />
	<title></title>
	<script type="text/javascript" src="../../vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
	{{name}}
	<my-component><p>a</p></my-component>
	<my-another-component></my-another-component>
</div>
<script>
	let vue = new Vue({
			data:{
				name: '刘涛'
			},
			components: {
				myComponent: {
					template: `<div>test{{test}}<slot></slot></div>`,
					data(){
						return {
							test: '哈哈哈哈'
						}
					}
				},
				myAnotherComponent: {
					template: `<div>another</div>`
				}
			}
		}
	).$mount('#app');
</script>
</body>
</html>